<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core" 
      xmlns:p="http://primefaces.org/ui" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>
        <base href="#{request.contextPath}/" />
        <title><h:outputText value="Entre em contato" /></title>
        <link rel="stylesheet" type="text/css" href="css/contato.css" />
        <script language="javascript" >
            function enviaEmail(){
                $assunto = document.getElementById('assunto').value;
                $email = document.getElementById('email').value;
                $texto = document.getElementById('nome').value;
                $texto += ' ';
                $texto += document.getElementById('texto').value;
                document.getElementById('linkenvia').href = 'http://mailto:heinen_ale@hotmail.com?subject=' + $assunto + '&#38;body=' + $texto + '&#38;from=' + $email;
                return true;
            }
        </script>
    </h:head>
    <h:body>
        <p:panel id="panelTitle" >
            <p:graphicImage value="css/img/logo8.png" id="logo" alt="imagem titulo"/>
        </p:panel>
        <p:panel id="panelBody" >
            <h:form prependId="false" >
                <h:outputLabel value="Entre em Contato" id="textTitle" />
                <br />
                <h:outputLabel value="Nome" for="nome" />
                <br />
                <p:inputText id="nome" />
                <br />
                <h:outputLabel value="Assunto" for="assunto" />
                <br />
                <p:inputText id="assunto" />
                <br />
                <h:outputLabel value="Email" for="email" />
                <br />
                <p:inputText id="email" />
                <br />
                <h:outputLabel value="Texto" for="texto" />
                <br />
                <p:inputText id="texto" />
                <a href="mailto:heinen_ale@hotmail.com" id="linkenvia">envia email</a>
                <p:commandButton value="Enviar" type="submit" onclick="return enviaEmail();" /> 
            <p:commandButton action="#{enviarEmailMB.enviarEmail}" value="enviar email" />
            </h:form>
        </p:panel>
    </h:body>
</html>